package com.rtos.model.process;

import com.rtos.model.memory.MemoryDispatcher;

/**
 * @Author: biubiu0002
 * @Date: 2021-10-11 15:02
 **/
public class ProcessFactory {
    private final ProcessDispatcher processDispatcher = ProcessDispatcher.getInstance();
    private static ProcessFactory processFactory;

    private ProcessFactory(){}

    public static ProcessFactory getInstance(){
        if(processFactory==null){
            processFactory=new ProcessFactory();
        }
        return processFactory;
    }


    public Process createProcess(){
        return processDispatcher.create();
    }

}
